
// #ifndef VUE3
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'

import routers from './router'

function configRouters(app) {
  let globalProperties = app.config.globalProperties;
  globalProperties.$routers = routers
  globalProperties.to = (name, params, callback, redirect)=>{
    routers.to(name, params, callback, redirect)
  }
}

export function createApp() {
  const app = createSSRApp(App)

  configRouters(app);
  
  return {
    app
  }
}
// #endif